<?php include('header.php')?>
<?php
use \LaneWeChat\Core\Db;
use \LaneWeChat\Core\Ext;
include '/var/www/html/wx/wechat/core/ext.lib.php';
include '/var/www/html/wx/wechat/core/db.lib.php';
$accounts = \LaneWeChat\Core\Ext::AccountList($_SESSION['sid']);
?>
<title>微信公众号配置</title>
<style type="text/css">
    .submitBtn{ margin-top:20px;}
    #image-container{ background:rgba(0,0,0,0.4)}
    .uploadResult{ width:150px; position:relative; overflow:hidden; border:1px solid #ddd; background:#fff; border-radius:3px;}
    .uploadResult .con{ overflow:hidden; text-align:center; background:#eeeeee; border:4px solid #fff;}
    .uploadResult.loading .con{ padding:30px 15px;}
    .uploadResult.loading .con .text{ display:block; font-size:12px; color:#8b8b8b}
    .uploadResult.success .con{ height:120px;}
    .uploadResult.success .con img{ height:100%;}
    #uploadResultCon{ float:left}
    .uploadFailTip{ display:none; float:left; margin:15px 0 0 10px;}
    .uploadFailTip .p{ font-size:12px; line-height:1.1; color:red;}
    .uploadFailTip .p.p1{ font-size:14px; font-weight:bold}
    .uploadTip{ clear:both; width:100%; padding-top:5px;}
    .modal.in .modal-dialog{ margin-top:60px;}
</style>
</head>
<body>
<input id="hashHidInp" name="" type="hidden" value="<?=$_GET["hash"]?>"/>
<div class="navbar navbar-inverse navbar-static-top" role="navigation" style="position:static;">
    <div class="container-fluid">
        <ul class="nav navbar-nav">
            <li><a href="http://www.12301.cc"><i class="fa fa-reply-all"></i>返回系统</a></li>
        </ul>
    </div>
</div>
<div class="container-fluid">
    <div class="row">
        <?php include('leftbar.php')?>
        <div class="col-xs-12 col-sm-9 col-lg-10">
            <iframe src="about:blank" style="display: none;height: 0;width: 0;" id="_hide_frame_" name="_hide_frame_" frameborder="0"></iframe>
            <form class="form form-horizontal" action="ichat.php" method="post" target="_hide_frame_">
                <?php include 'acc_info.php';?>
                <ul id="tabNavWrap" class="nav nav-tabs">
                    <li class="tabNav active"><a href="javascript:;">关注欢迎消息</a></li>
                    <li class="tabNav"><a href="javascript:;">默认回复</a></li>
                </ul>
                <div id="tabConWrap" class="clearfix">
                    <input name="action" type="hidden" value="SetKeyWord"/>
                    <input name="SpecialResponse" type="hidden" value="SpecialResponse"/>
                    <div id="weblTabPanel" class="panel panel-default tabPanel">
                        <div class="panel-heading"> 欢迎消息</div>
                        <div class="panel-body" style="position:relative">
                            <div class="form-group">
                                <label class="col-xs-12 col-sm-3 col-md-2 control-label">回复类型:</label>
                                <div id="welSwitchTabNavWrap" class="col-sm-9" style="position:relative">
                                    <label for="msg_type_1" data-type="TEXT" class="radio-inline welTabNav active">
                                        <input type="radio" name="msg_type" id="msg_type_1" value="TEXT" checked="checked">文本消息
                                    </label>
                                    <label for="msg_type_2" data-type="TEXT_IMAGE" class="radio-inline welTabNav">
                                        <input type="radio" name="msg_type" id="msg_type_2" value="IMAGE">图文消息
                                    </label>
                                </div>
                            </div>
                            <div class="form-group welPanel" id="welPanel_text">
                                <label class="col-xs-12 col-sm-3 col-md-2 control-label">消息内容:</label>
                                <div class="col-sm-9">
                                    <textarea id="reply_welcome_textarea" class="form-control" placeholder="粉丝关注此公众号时回复的消息" name="special[EVENT_SUBSCRIBE]"></textarea>
                                    <div class="help-block">
                                        指定用户添加公众帐号好友时，发送的欢迎消息<br>
                                        比如这里添加关键字: 欢迎关注, 那么用户添加公众号好友时, 系统相当于接受了粉丝用户的消息, 内容为"欢迎关注"
                                    </div>
                                </div>
                            </div>

                            <div class="welPanel" id="welPanel_img" style="display:none;">
                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
                                    <div id="welReplyWrap" class="col-sm-9">
                                        <input style="float:right" id="addWelReplyBoxBtn" name="" type="button" value="添加" class="btn btn-primary col-lg-1">
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
                                <div class="col-sm-9">
                                    <input id="submitBtn_welcome" name="submit" type="button" value="提交" class="submitBtn btn btn-primary col-lg-2">
                                </div>
                            </div>
                            <div id="welcome_loading" class="menuLoadingLayer"><div class="loading"><i class="fa fa-spinner fa-spin"></i>loading...</div></div>
                        </div>
                    </div>
                    <div id="defTabPanel" style="display:none" class="panel panel-default tabPanel">
                        <div class="panel-heading"> 默认回复</div>
                        <div class="panel-body" style="position:relative">
                            <div class="form-group">
                                <label class="col-xs-12 col-sm-3 col-md-2 control-label">默认回复:</label>
                                <div class="col-sm-9">
                                    <textarea id="reply_default_textarea" class="form-control" placeholder="当系统不知道该如何回复粉丝的消息时，默认发送的内容" name="special[DEFAULT]"></textarea>
                                    <div class="help-block">
                                        指定系统不知道该如何回复粉丝的消息时，发送的默认消息, 你可以在这里输入关键字, 那么系统不知道该如何回复粉丝的消息时就相当于发送这个内容至系统<br>
                                        比如这里添加回复: 您好，系统无法识别您的输入, 当系统不知道该如何回复粉丝的消息时, 系统的回复内容为"您好，系统无法识别您的输入"
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
                                <div class="col-sm-9">
                                    <input id="submitBtn_defaultReply" name="submit" type="submit" value="提交" class="submitBtn btn btn-primary col-lg-2">
                                </div>
                            </div>
                            <div id="submit_default_loading" class="menuLoadingLayer"><div class="loading"><i class="fa fa-spinner fa-spin"></i>loading...</div></div>
                        </div>

                    </div>
                </div>
            </form>
        </div>
    </div>

    <div id="image-container" class="modal fade in" tabindex="-1" role="dialog" aria-hidden="false">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button id="closeImgDialogBtn" type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h3>请选择图片</h3>
                </div>
                <div class="modal-body">
                    <ul id="imgDialog-tabNavCon" class="nav nav-tabs" style="margin:auto -10px;padding:0 10px;">
                        <li class="imgnamespance dialog-tabNav"><a href="###" data-toggle="tab">网络图片</a></li>
                        <li class="active upload dialog-tabNav"><a href="###" data-toggle="tab">上传图片</a></li>
                    </ul>
                    <div id="imgDialog-tabPanCon" class="tab-content form-horizontal" style="padding:20px 0;">
                        <div class="tab-pane" id="image_browser">
                            <div class="form-group"><label class="col-xs-12 col-sm-2 control-label">图片地址</label>
                                <div class="col-sm-10"><div class="input-group">
                                        <input id="imgUpload_space_inpFile" style="width:450px;" class="form-control" type="text" id="image_url" value="" placeholder="请输入图片URL">
                                        <!--<span class="input-group-btn"><button class="btn btn-default btn-browser" type="button">浏览图片空间</button></span>-->
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane active" id="image_upload">
                            <iframe width="0" height="0" name="__image_file_uploader" style="display:none;"></iframe>
                            <form id="imgUpload_form" action="ichat.php" enctype="multipart/form-data" method="post" target="__image_file_uploader">
                                <input name="action" value="UploadImage" type="hidden"/>
                                <input name="auth" value="" type="hidden"/><!--input:hidden[name=auth]-->
                                <input name="callback" value="dialog.onImguploadComplete" type="hidden"/>
                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-2 control-label">上传图片</label>
                                    <div class="col-sm-10">
                                        <input type="file" name="image" id="imgUpload_inpFile" tabindex="-1" style="position: absolute; clip: rect(0px 0px 0px 0px);">
                                        <div class="bootstrap-filestyle input-group">
                                            <input id="imgUpload_fileVal" type="text" class="form-control " disabled>
                                            <span class="group-span-filestyle input-group-btn" tabindex="0">
                                                <label for="imgUpload_inpFile" class="btn btn-default ">
                                                <span class="fa fa-folder"></span> 上传图片</label>
                                            </span>
                                        </div>
                                        <div class="tip">图片格式：jpg, png, gif</div>
                                        <input type="hidden" name="options" value=""></div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" id="cancelImgDialogBtn" class="btn btn-default">取消</button>
                    <button type="button" id="submitImgUploadBtn" class="btn btn-primary">确认</button></div>
            </div>
        </div>
    </div>

</div>
<?php include("/var/www/html/new/d/wx_public/js/specialReply/tpl/welReply_image.html");?>
<script type="text/javascript" src="http://www.12301.cc/js/global/www.12301.cc.global.js"></script>
<script type="text/javascript" src="http://wx.12301.cc/public/js/build/common.min.js"></script>
<script type="text/javascript" src="http://www.12301.cc/wx_public/js/specialReply/io.js"></script>
<script type="text/javascript" src="http://www.12301.cc/wx_public/js/specialReply/dialog.js"></script>
<script type="text/javascript" src="http://www.12301.cc/wx_public/js/specialReply/defaultReply.js"></script>
<script type="text/javascript" src="http://www.12301.cc/wx_public/js/specialReply/welcomeReply.js"></script>
<script type="text/javascript" src="http://www.12301.cc/wx_public/js/specialReply/accountList.js"></script>
<script type="text/javascript" src="http://www.12301.cc/wx_public/js/specialReply/main.js"></script>

</body>